import 'package:dirver/pages/home/tab_index/navigator.dart';
import 'package:dirver/pages/home/tab_index/recommend.dart';
import 'package:dirver/pages/home/tab_index/widget_list.dart';
import 'package:dirver/widgets/carousel_slider.dart';
import 'package:flutter/material.dart';

class TabIndex extends StatefulWidget {
  const TabIndex({Key? key}) : super(key: key);

  @override
  State<TabIndex> createState() => _TabIndexState();
}

class _TabIndexState extends State<TabIndex> {
  @override
  Widget build(BuildContext context) {
    final theme = Theme.of(context);
    final primaryColor = theme.primaryColor;
    return Scaffold(
      appBar: AppBar(
        title: Text('首页',style: TextStyle(color: Colors.white)),
        backgroundColor: primaryColor,
      ),
      body: SafeArea(
        child: ListView(
          children: [
            CarouselSliderWidget(),
            NavigatorWidget(),
            RecommendWidget(),
            WidgetList(),
          ],
        ),
      ),
    );
  }
}